#include "Point.h"
#include <iostream>
using namespace std;

Point::Point(int x, int y)
	:x(x),
	y(y)
{
}
void Point::display() const
{
	cout << "(" << x << ", " << y << ")" << endl;
}

Circle::Circle(const Point& center, int radius)
	:center(center),
	radius(radius)
{

}

void Circle::onDraw()
{
	cout << "this is circle: " << endl;
	cout << "center: " << this->center << endl;
	cout << "radius: " << this->radius << endl;
}

Triange::Triange(const Point& p1, const Point& p2, const Point& p3)
	:p1(p1),
	p2(p2),
	p3(p3)
{

}

void Triange::onDraw()
{
	cout << "this is triangle: " << endl;
	cout << p1 << ", " << p2 << ", " << p3 << endl;
}


ostream& operator << (ostream& out, const Point& rhs)
{
	out << "(" << rhs.x << ", " << rhs.y << ")";
	return out;
}




